package pl.edu.mimuw.mas.message;

import jade.core.AID;
import pl.edu.mimuw.mas.util.Position;

public final class PositionMessage extends AbstractInternalMessage {
	private static final long serialVersionUID = -35131357211680701L;
	
	public final int x, y;
	
	public PositionMessage(AID aid, int x, int y) {
		super(aid);
		this.x = x;
		this.y = y;
	}
	
	public PositionMessage(AID aid, Position pos) {
		super(aid);
		this.x = pos.x;
		this.y = pos.y;		
	}
	
	public Position getPosition() {
		Position pos = new Position();
		pos.x = x;
		pos.y = y;
		
		return pos;
	}
}
